package com.wesley.spring.service;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * DemoService
 *
 * @author WangPanYong
 * @since 2020/10/22 16:02
 */
@Service
public class DemoService {

    public void hello(String str) {
        System.out.println(" ====> hello:"+ str);
    }

	/**
	 * EventListenerMethodProcessor 类处理此注解
	 */
	@EventListener
	public void listener(ApplicationEvent event) {
		System.out.println(event);
	}

}
